package map;

import java.util.*;

public class CollectionsDemo {
    public static void main(String[] args) {
        List list = new ArrayList();
        Random rand = new Random();
        for (int i = 0; i < 10; i++) {
            list.add(rand.nextInt(100));
        }
        System.out.println("原始数据"+list);
        Collections.sort(list);
        System.out.println("排序输出："+list);
        Collections.reverse(list);
        System.out.println("大到小排序："+list);

    }
}
